
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JApplet;
import javax.swing.JButton;
import javax.swing.JPopupMenu;
import javax.swing.ToolTipManager;

import project.Designer;

import CAD.MainFrame;;


public class Applet extends JApplet{
	public JButton iniciarButton = new JButton("Start");
	public static MainFrame principal;
	


	public void init(){

		JPopupMenu.setDefaultLightWeightPopupEnabled(false);
		ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
		Designer.setId(Integer.parseInt(getParameter("userID")));
		Designer.setName( getParameter("userName"));
		try{
			jbInit();
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
	public static void main(String[] args)
	{
		JPopupMenu.setDefaultLightWeightPopupEnabled(false);
		ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
		principal = new MainFrame();

	}

	private void jbInit() throws Exception {
		this.getContentPane().add(iniciarButton);
		iniciarButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {


				principal = new MainFrame();	
			}
		});
	}


}